<?php
class Staticizer_News_Index_Topic extends Staticizer
{
    public function Build($param=NULL)
    {
        #获取数据
        $data=DB::GetRows('select ID,Title,Location,Thumbnail from Topic order by Datetime desc limit 0,1');

        #处理数据
        foreach($data as &$row)
        {
            $row['Thumbnail']=Config::PATH_RELATIVE_ATTACHMENT_TOPIC.'/'.$row['Thumbnail'];
        }

        #绑定数据
        View::Assign('Topics',$data);

        #生成静态
        $this->Save('news/index/topic.html',View::Fetch('news/index/topic.tpl'));
    }
}
?>